package com.example.controller;

import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.example.common.enums.ResponseCodeEnum;
import com.example.common.utils.ApiResult;
import com.example.common.utils.DateFormatUtil;
import com.example.common.utils.WebUtils;
import com.example.model.entity.SuppliesRealinfo;
import com.example.model.query.PersonQuery;
import com.example.model.query.SuppliesRealinfoQuery;
import com.example.service.SuppliesRealinfoService;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.example.model.home.*;
import org.springframework.beans.factory.annotation.Value;

/**
 * SuppliesRealinfo Controller
 * 2020-08-27 18:59
 */
@Controller
@RestController
@RequestMapping("/suppliesRealinfo")
@CrossOrigin
@Api(value = "物资上报消息管理",tags={"物资上报消息接口"})
public class SuppliesRealinfoController {

	private static final Logger logger = LoggerFactory.getLogger(SuppliesRealinfoController.class);
	private int pageSize = 10;
	private int currentPage = 1;

	@Value("${sys_error:}")
	private String sysError;
	
	@Value("${login_timeout:}")
	private String loginTimeout;

	@Autowired
	private SuppliesRealinfoService realinfoService;

	/**
	 * 分页查询列表
	 */
	@GetMapping("/page")
	public ApiResult<SuppliesRealinfoQuery> pageByQuery(SuppliesRealinfoQuery query) {
		try {
			return realinfoService.pageUserVoByQuery(query);
		}   catch (Exception e) {
			e.printStackTrace();
			return new ApiResult<>(ResponseCodeEnum.MALL_SERVICE_PAGE_AD_FALSE);
		}
	}
	
}
